﻿

CREATE PROCEDURE [dbo].[s_Express_Move]
	@LoanID int = 0
AS
SET IMPLICIT_TRANSACTIONS OFF
DECLARE cur CURSOR
READ_ONLY FOR
SELECT  ID FROM  t_Loan WHERE MenuID = 34 AND MsID > '' AND @LoanID IN (0,ID)

OPEN cur

FETCH NEXT FROM cur INTO @LoanID
WHILE @@fetch_status = 0 BEGIN
	PRINT @LoanID
	EXEC s_MenuIDEx @LoanID, 84
	--IF dbo.Stop() = 1 BREAK
	FETCH NEXT FROM cur INTO @LoanID
END

CLOSE cur
DEALLOCATE cur


